<?php
namespace app\admin\controller;

use think\Controller;
use think\Db;
use  think\Session;
class Enroll extends  Controller
{

    public function cenroll(){
        $cid= Session::get("clubid");
        $result=Db::query("select*from course_enroll c1,course c2,user u where c1.courseid = c2.courseid and c2.clubid='$cid' and c1.userid=u.userid order by c1.enrollid desc");
        $this->assign("clsit",$result);
        return $this->fetch();
    }
    public function genroll(){
        $cid= Session::get("clubid");
        $result=Db::query("select*from game_enroll g1,game g2,user u where g1.gameid = g2.gameid and g2.clubid='$cid' and g1.userid=u.userid order by g1.enrollid desc");
        $this->assign("glist",$result);
        return $this->fetch();
    }

}